package com.atguigu.java8.day29.java2;

@FunctionalInterface
public interface ObjectMethodFunctionalInterface {
    void count(int i);
    String toString(); //same to Object.toString
    int hashCode(); //same to Object.hashCode
    boolean equals(Object obj); //same to Object.equals
}

//下面的接口就不是函数式接口，因为Object.clone方法是protected类型。
interface WrongObjectMethodFunctionalInterface {
    void count(int i);
    Object clone(); //Object.clone is protected
}